/* ========================================================================= */
/* ------------------------------------------------------------------------- */
/*!
  \file			cstdlg.cc
  \date			June 2011
  \author		TNick

  \brief		Contains the implementation for CstDlg class


 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @n
 Please read ReadMe.txt and Licence.txt in root folder @n
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @n

*/
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
//
//
//
//
/*  INCLUDES    ------------------------------------------------------------ */

#include	"cstdlg.h"
#include	"ui_cstdlg.h"
#include	"../actions/cst_actmdl.h"
#include	"../menus/cst_mnumdl.h"
#include	"../toolbars/cst_tlbmdl.h"



/*  INCLUDES    ============================================================ */
//
//
//
//
/*  CLASS    --------------------------------------------------------------- */

/* ------------------------------------------------------------------------- */
CstDlg::CstDlg(QWidget *parent) :
	QDialog(parent),
	ui(new Ui::CstDlg)/**/
{

	/* Creator is unable to do this on it's own right now */
	ui->setupUi(this);
	ui->tab_view->addTab(tr("Actions"));
	ui->tab_view->addTab(tr("Toolbars"));
	ui->tab_view->addTab(tr("Menus"));

	/* create and load models for the view */
	viewmd = ACTIONS;
	act_model = new CstActMdl(this, false);
	tlb_model = new CstTlbMdl(this, false);
	mnu_model = new CstMnuMdl(this, false);
	CustMdl::duplicate_chains(act_model,tlb_model,mnu_model);
	ui->lv_crtlst->setModel(act_model);

}
/* ========================================================================= */

/* ------------------------------------------------------------------------- */
CstDlg::~CstDlg()
{
	delete ui;
}
/* ========================================================================= */

/* ------------------------------------------------------------------------- */
void CstDlg::on_bbx_global_clicked(QAbstractButton *button)
{
	QDialogButtonBox::ButtonRole br = ui->bbx_global->buttonRole(button);
	switch (br)	{
	case QDialogButtonBox::AcceptRole:	{
			close();
			break;}
	case QDialogButtonBox::RejectRole:	{
			close();
			break;}
	case QDialogButtonBox::Apply:	{

			break;}
	case QDialogButtonBox::RestoreDefaults:	{

			break;}
	}
}
/* ========================================================================= */

/* ------------------------------------------------------------------------- */
void CstDlg::on_b_sel_adv_clicked()
{

}
/* ========================================================================= */

/* ------------------------------------------------------------------------- */
void CstDlg::on_b_sel_add_clicked()
{

}
/* ========================================================================= */

/* ------------------------------------------------------------------------- */
void CstDlg::on_b_sel_sink_clicked()
{

}
/* ========================================================================= */

/* ------------------------------------------------------------------------- */
void CstDlg::on_b_sel_rem_clicked()
{

}
/* ========================================================================= */

/* ------------------------------------------------------------------------- */
void CstDlg::on_lv_crtlst_clicked(const QModelIndex &index)
{
	Q_UNUSED(index);
}
/* ========================================================================= */

/*  CLASS    =============================================================== */
//
//
//
//
/* ------------------------------------------------------------------------- */
/* ========================================================================= */



